#!/bin/sh
#Este script ejecuta freeling sobre los archivos de opiniones de ciao.
cd ~/Documents/projects/sistemaFinalTesis/corpus-ciao.es/reviews/

for name in $(ls)
do
	if [ -d $name ]; then
    	echo "processing file ${name}"
    	cd $name
    	for noYesFile in $(ls *.txt)
    	do
    		freelingFileName=`echo ${noYesFile}.freeling`
    		if [ ! -f $freelingFileName ]; then
    			echo "running freeling over ${noYesFile}"
				analyzer_client ocovinu.com.ar 50505 < $noYesFile > ${noYesFile}.freeling
    		fi
    	done
    	cd ..
    fi
done